package com.jc.util;

import com.jc.vo.ApiConfig;
import org.apache.commons.codec.digest.DigestUtils;

public class SignUtil {


    public static String generateSign(ApiConfig config,String now) {
        String rawData = config.getSecretId() + now + config.getSecretKey();
        return DigestUtils.md5Hex(rawData);
    }

    public static void main(String[] args) {
        ApiConfig config =new  ApiConfig();
        config.setSecretId("100002");
        config.setSecretKey("2a4afaf10a0ebd926dc91387373a0594");

        System.out.println(SignUtil.generateSign(config,"20220325181833"));
    }
}
